-- GENERATED SPELL FOR [Felguard Degrader] --


function spell0_23055(pUnit, Event) --@Absorb Life,n/a--
pUnit:FullCastSpellOnTarget(40658,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23055', 615, 1)
end

function spell1_23055(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(40220,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23055', 5000, 1)
end

function spell2_23055(pUnit, Event) --@Smash Shield,n/a--
pUnit:FullCastSpellOnTarget(40222,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23055', 0, 1)
end

function spell3_23055(pUnit, Event) --@Terrifying Roar,Self--
pUnit:FullCastSpellOnTarget(40221,pUnit)
pUnit:RegisterEvent('Sorts_23055', 6000, 1)
end

function Sorts_23055(pUnit, Event)
local choix_sorts_23055 = math.random(0, 3)
if choix_sorts_23055 == 0 then
pUnit:RegisterEvent('spell0_23055', 1, 1)
end
if choix_sorts_23055 == 1 then
pUnit:RegisterEvent('spell1_23055', 1, 1)
end
if choix_sorts_23055 == 2 then
pUnit:RegisterEvent('spell2_23055', 1, 1)
end
if choix_sorts_23055 == 3 then
pUnit:RegisterEvent('spell3_23055', 1, 1)
end
end

function mob23055_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23055', math.random(1500, 3000), 1)
end

function mob23055_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23055_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23055_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23055, 1, 'mob23055_Action')
RegisterUnitEvent(23055, 2, 'mob23055_Leave')
RegisterUnitEvent(23055, 3, 'mob23055_Kill')
RegisterUnitEvent(23055, 4, 'mob23055_Die')
